#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int menu(int m)
{
	if (m == 1)
		return 1;
	else
		return m * menu(m - 1);
}

int main()
{
	int m = 0;
	scanf("%d", &m);
	int ret = menu(m);
	printf("%d\n", ret);
	return 0;
}